import request from '@/utils/request'

// 查询语言列表
export function listLanguage(query) {
  return request({
    url: '/basic/language/list',
    method: 'get',
    params: query
  })
}

// 查询语言详细
export function getLanguage(languageId) {
  return request({
    url: '/basic/language/' + languageId,
    method: 'get'
  })
}

// 新增语言
export function addLanguage(data) {
  return request({
    url: '/basic/language',
    method: 'post',
    data: data
  })
}

// 修改语言
export function updateLanguage(data) {
  return request({
    url: '/basic/language',
    method: 'put',
    data: data
  })
}

// 删除语言
export function delLanguage(languageId) {
  return request({
    url: '/basic/language/' + languageId,
    method: 'delete'
  })
}

// 获取所有语言
export function getAllLanguages() {
  return request({
    url: '/basic/language/all',
    method: 'get'
  })
}